package dto

type LoginUserDto struct {
	UserName string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}
type UserData struct {
	Avatar       string   `json:"avatar"`
	Nickname     string   `json:"nickname" `
	Username     string   `json:"username" `
	Roles        []string `json:"roles"`
	Permissions  []string `json:"permissions"`
	AccessToken  string   `json:"accessToken"`
	RefreshToken string   `json:"refreshToken"`
	Expires      string   `json:"expires"`
}
type ResponseMenuDto struct {
	Success bool       `json:"success"`
	Data    []*MenuDto `json:"data"`
}
type RefreshTokenRequest struct {
	RefreshToken string `json:"refreshToken"`
}
type RefreshTokenResult struct {
	Success bool `json:"success"`
	Data    struct {
		AccessToken  string `json:"accessToken"`
		RefreshToken string `json:"refreshToken"`
		Expires      string `json:"expires"`
	} `json:"data"`
}

type GetUserListDto struct {
	CurrentPage int    `json:"currentPage" form:"currentPage"`
	PageSize    int    `json:"pageSize" form:"pageSize"`
	DeptId      string `json:"deptId" form:"deptId"`
	Status      string `json:"status" form:"status"`
	UserInfo    string `json:"userInfo" form:"userInfo"`
}

type CreateUserDto struct {
	Nickname string `json:"nickname" validate:"required"`
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
	DeptId   uint   `json:"deptId"`
	Status   int8   `json:"status"`
	Phone    string `json:"phone"`
	Email    string `json:"email"`
	Sex      uint8  `json:"sex"`
}

type UpdateUserDto struct {
	ID       uint   `json:"id" form:"id"`
	Nickname string `json:"nickname" validate:"required"`
	Username string `json:"username" validate:"required"`
	DeptId   uint   `json:"deptId"`
	Status   int8   `json:"status"`
	Phone    string `json:"phone"`
	Email    string `json:"email"`
	Sex      uint8  `json:"sex"`
}
type DeleteUserDto struct {
	ID uint `json:"ID"`
}
type GetUserRoleIdsDto struct {
	ID uint `json:"userId"`
}
type UpdatePasswordDto struct {
	ID          uint   `json:"id"`
	NewPassword string `json:"newPassword"`
}
type UpdateUserRoleDto struct {
	ID      uint   `json:"id" form:"id"`
	RoleIds []uint `json:"roleIds"`
}
type BatchDeleteUserDto struct {
	IDs []uint `json:"ids"`
}

type UpdateUserInfoDto struct {
	ID          uint   `json:"id"`
	Nickname    string `json:"nickname"`
	Email       string `json:"email"`
	Phone       string `json:"phone"`
	Description string `json:"description"`
}

type UpdateUserPasswordDto struct {
	ID              uint   `json:"userId"`
	CurrentPassword string `json:"currentPassword"`
	NewPassword     string `json:"newPassword"`
}
